import java.util.Random;
import java.util.Scanner;



public class suijishu {
    public static void main(String[] args) {

        Random r = new Random();
        int num = r.nextInt(10) + 1;
        while(true){
            Scanner sc =  new Scanner(System.in);
            System.out.println("请输入你要猜的数字");
            int mynumber = sc.nextInt();
            if(mynumber>num){
                System.out.println("你输入的数字大了");
            }else if(mynumber<num){
                System.out.println("你输入的数字小了");
            }else{
                System.out.println("对了");
                break;
            }
        }







    }
}
